package com.lingkang.ztauthserver.service.impl;

import com.lingkang.ztauthserver.data.entity.Roles;
import com.lingkang.ztauthserver.data.entity.Users;
import com.lingkang.ztauthserver.data.mapper.RolesMapper;
import com.lingkang.ztauthserver.data.mapper.UsersMapper;
import com.lingkang.ztauthserver.service.UserService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author linke
 * @date 2020/11/12 22:43
 * @description
 */
@Service
public class UserServiceImpl implements UserService {

  @Autowired
  private UsersMapper usersMapper;
  @Autowired
  private RolesMapper rolesMapper;

  @Override
  public Users get(String username) {
    return usersMapper.get(username);
  }

  @Override
  public List<Roles> getRoles(String username) {
    return rolesMapper.getRoles(username);
  }
}
